package Work3;
import java.util.ArrayList;

public class hongbaoinfo {
	private String name;
	private int money;
	private int people; 
	private ArrayList<Integer> hongbao;
	public ArrayList<String> getpeople= new ArrayList<>();
	public ArrayList<Integer> getmoney= new ArrayList<>();
	public void setname(String name) {
		this.name=name;
	}
	public void setmoney(int money) {
		this.money=money;
	}
	public void setpeople(int people) {
		this.people=people;
	}
	public void sethongbao(ArrayList<Integer> hongbao) {
		this.hongbao=hongbao;
	}
	public String getname() {
		return this.name;
	}
	public int getmoney() {
		return this.money;
	}
	public int getpeople() {
		return this.people;
	}
	public ArrayList<Integer> gethongbao() {
		return this.hongbao;
	}
	public void Info_of_hongbao() {
		System.out.println("---红包信息---");
		if((this.people-getpeople.size())==0) {
			System.out.println("红包抢完了");
			for(int i=0;i<getpeople.size();i++) {
				System.out.println(getpeople.get(i)+":"+getmoney.get(i));
			}
			return;
		}
		System.out.println("还剩"+(this.people-getpeople.size())+"包");
		int temp=0;
		for(int i=0;i<getpeople.size();i++) {
			temp+=getmoney.get(i);
		}
		System.out.println("还剩"+(this.money-temp)+"元");
		for(int i=0;i<getpeople.size();i++) {
			System.out.println(getpeople.get(i)+":"+getmoney.get(i));
		}
	}
	public void Get(String name) {
		
	}
}
